import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
//导入全局样式
import '../src/assets/css/global.css'
//导入字体图标
import '../src/assets/fonts/iconfont.css'

//数据请求
import axios from 'axios'
//挂载$http
Vue.prototype.$http = axios
//配置请示的根路径
axios.defaults.baseURL='http://127.0.0.1:9999/api/private/v1/'
axios.interceptors.request.use(config => {
  console.log(config)
  config.headers.Authorization = window.sessionStorage.getItem('token')
  //最后必须return
  return config
})

Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
